<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>结构伪类选择器</title>
  <style>
    div>p:first-child {
      color: orange;
    }
    div>p:last-child {
      color: chocolate;
    }
    div>p:first-of-type {
      background-color: grey;
    }
    div>p:last-of-type {
      background-color: gray;
    }
    div>p:nth-child(3) {
      background-color: aquamarine;
    }
    div>p:nth-of-type(2) {
      font-size: 20px;
    }
    /* 
      div>p:nth-last-child()
      div>p:nth-last-of-type()
      span:only-child
      span:only-of-type
      :root
      div:empty
    */
  </style>
</head>
<body>
  <div>
    <p>赵六：99 分</p>
    <p>赵六：98 分</p>
    <p>赵六：88 分</p>
    <p>赵六：78 分</p>
  </div>

  <hr>

  <div>
    <span>赵六：99 分</span>
    <p>赵六：98 分</p>
    <p>赵六：88 分</p>
    <p>赵六：98 分</p>
    <span>赵六：78 分</span>
  </div>
</body>
</html>